package com.ruiysoft.entity.integral;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author liyahui
 * @since 2019-04-13
 */
@TableName("integral_current")
public class IntegralCurrent extends Model<IntegralCurrent> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("integral_id")
    private Long integralId;

    @TableField("shop_id")
    private Long shopId;

    @TableField("trade_no")
    private String tradeNo;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 积分金额
     */
    private Long integral;

    /**
     * 交易类型（1，充值，2，消费，3，退款）
     */
    @TableField("trade_type")
    private Integer tradeType;

    /**
     * 创建时间
     */
    private Date createtime;

    public Long getId() {
        return id;
    }

    public IntegralCurrent setId(Long id) {
        this.id = id;
        return this;
    }
    public Long getIntegralId() {
        return integralId;
    }

    public IntegralCurrent setIntegralId(Long integralId) {
        this.integralId = integralId;
        return this;
    }
    public Long getShopId() {
        return shopId;
    }

    public IntegralCurrent setShopId(Long shopId) {
        this.shopId = shopId;
        return this;
    }
    public String getTradeNo() {
        return tradeNo;
    }

    public IntegralCurrent setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
        return this;
    }
    public String getPhone() {
        return phone;
    }

    public IntegralCurrent setPhone(String phone) {
        this.phone = phone;
        return this;
    }
    public Long getIntegral() {
        return integral;
    }

    public IntegralCurrent setIntegral(Long integral) {
        this.integral = integral;
        return this;
    }
    public Integer getTradeType() {
        return tradeType;
    }

    public IntegralCurrent setTradeType(Integer tradeType) {
        this.tradeType = tradeType;
        return this;
    }
    public Date getCreatetime() {
        return createtime;
    }

    public IntegralCurrent setCreatetime(Date createtime) {
        this.createtime = createtime;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "IntegralCurrent{" +
        "id=" + id +
        ", integralId=" + integralId +
        ", shopId=" + shopId +
        ", tradeNo=" + tradeNo +
        ", phone=" + phone +
        ", integral=" + integral +
        ", tradeType=" + tradeType +
        ", createtime=" + createtime +
        "}";
    }
}
